package com.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author 杨冰清
 * @Date 21:01
 * @Description 订单商品表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderItem {
    /**
     * 编号
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("id")
    private Integer id;
    /**
     * 归属订单编号
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("order_no")
    private String orderNo;
    /**
     * 商品编号
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("product_id")
    private Integer productId;
    /**
     * 商品名称
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("product_name")
    private String productName;
    /**
     * 商品图片
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("product_img")
    private String productImg;
    /**
     * 单价
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("unit_price")
    private Integer unitPrice;
    /**
     * 商品数量
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("quality")
    private Integer quantity;
    /**
     * 商品总价
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty("total_price")
    private Integer totalPrice;
    /**
     * 创建时间
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonProperty("create_time")
    private Date createTime;
    /**
     * 更新时间
     **/
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonProperty("update_time")
    private Date updateTime;
    //一个订单详情一个订单
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Order order;
}
